﻿@{
    ViewBag.Title = "Index"; 
}


@section Script
{
    <script src="~/Content/zTree/jquery.ztree.all-3.5.min.js"></script>
    <link href="~/Content/zTree/zTreeStyle.css" rel="stylesheet" />
    <script src="~/Content/zTree/zTree.js"></script>

    <script type="text/javascript">
        $(function () {
            initTree("tree", "Chart/GetNodes", { pid: "" }, function (node) {
                alert(node);
                $.post("Chart/UserDetail", { id: node.id }, function (html) {               
                    $(".user-detail").html(html);
                });
            });
        });
    </script>

    <style type="text/css">
        .form-horizontal .control-label {
            width: 80px;
        }

        .form-horizontal .controls {
            margin-left: 100px;
        }
    </style>
}

<div style="width: 40%; float: left;">
    <ul id="tree" class="ztree"></ul>
</div>
<div style="width: 50%; float: left;" class="user-detail">
</div>
<div style="clear: both;"></div>
